import request from '@/utils/request_zc'

function getList ({ page, limit }) {
  return request({
    url: '/mes/error/prevention/list',
    method: 'get',
    params: {
      page,
      limit
    }
  })
}

function handleAdd (data) {
  return request({
    url: '/mes/error/prevention/add',
    method: 'post',
    data
  })
}

function handleEdit (data) {
  return request({
    url: '/mes/error/prevention/edit',
    method: 'post',
    data
  })
}

function handleDel ({ ids }) {
  return request({
    url: '/mes/error/prevention/del',
    method: 'post',
    data: {
      ids
    }
  })
}

export {
  getList,
  handleAdd,
  handleEdit,
  handleDel
}
